#!/bin/bash#
#
#
#webssh cmd
bash -c cd /opt/layui/webssh; env "PYTHONUNBUFFERED"="1"  "PYTHONOPTIMIZE"="1" "PYTHONPATH"="/opt/layui"   "PYTHONIOENCODING"="UTF-8" nohup /opt/py3/bin/python -u /opt/layui/webssh/main.py &

##django cmd

bash -c cd /opt/layui; env "PYTHONOPTIMIZE"="1"  "DJANGO_SETTINGS_MODULE"="layui.settings" "PYTHONPATH"="/opt/layui" "PYTHONUNBUFFERED"="1"  "PYTHONIOENCODING"="UTF-8" nohup /opt/py3/bin/python -u /opt/layui/manage.py runserver 0.0.0.0:8090 &


#celery worker
bash -c cd /opt/layui; env "PYTHONOPTIMIZE"="1" /opt/py3/bin/celery multi start w1 -O OPTIMIZATION -A layui worker -l info --logfile=./celery.worker.log


#celery flower
#bash -c cd /opt/layui; env "PYTHONOPTIMIZE"="1" nohup /opt/py3/bin/celery -A layui flower --port=5566 &

#celery beat
bash -c cd /opt/layui; env "PYTHONOPTIMIZE"="1" nohup /opt/py3/bin/celery -A layui beat -l info -S django --logfile=./celery.beat.log &

#rsync database
#mount -a && sh /data/database/autocopydb.sh
